#include <crtdbg.h>

#include <d3d9.h>
#include <d3dx9.h>

#include <windows.h>

#include "gamestate.h"
#include "core.h"

INT WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, INT )
{
#ifdef _DEBUG
	//_CrtSetBreakAlloc( 2769 );
	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

	int exitCode = 0;
	Core& core = Core::GetInstance();
	if( core.Initialize( hInstance ) )
	{
		 exitCode = core.Run();
	}

	return exitCode;
}